package com.dap.pojo;

import java.io.Serializable;

public class ActionResult<T> implements Serializable {

    /**
     * 操作码
     */
    private String code ;

    /**

     * 返回值

     */
    private T data;

    /**
     * 操作是否成功
     */
    private boolean  isSuccess        = true;

    /**
     * 操作信息
     */
    private  String message;


    public    static ActionResult   result = new ActionResult();

    public ActionResult(boolean isSuccess) {
        this.isSuccess = isSuccess;
    }


    public ActionResult(boolean isSuccess, String message) {
        this.isSuccess = isSuccess;
        this.message = message;
    }

    public ActionResult() {
    }

    public ActionResult(String code, T data, boolean isSuccess, String message) {
        this.code = code;
        this.data = data;
        this.isSuccess = isSuccess;
        this.message = message;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public boolean isSuccess() {
        return isSuccess;
    }

    public void setSuccess(boolean success) {
        isSuccess = success;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

}
